package com.speedata;

import android.app.Application;
import android.app.Service;
import android.os.Vibrator;

import com.tencent.bugly.crashreport.CrashReport;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xuyan
 */
public class MyApp extends Application {
    private static MyApp sInstance;
    private List<String> mList;

    @Override
    public void onCreate() {
        super.onCreate();
        sInstance = this;
        CrashReport.initCrashReport(getApplicationContext(), "19a9d53a78", true);
        mList = new ArrayList<>();
        mVibrator = (Vibrator) getSystemService(Service.VIBRATOR_SERVICE);
    }

    private Vibrator mVibrator;

    public Vibrator getVibrator() {
        if (mVibrator == null) {
            mVibrator = (Vibrator) getSystemService(Service.VIBRATOR_SERVICE);
        }
        return mVibrator;
    }

    public static MyApp getInstance() {
        return sInstance;
    }

    public List<String> getmList() {
        return mList;
    }

    public void setmList(List<String> mList) {
        this.mList = mList;
    }
}
